package com.fz.entity;

import com.fz.core.BaseEntity;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

/**
 * <p>
 * 存储社区公告发布与状态
 * </p>
 *
 * @author hyr
 * @since 2025-06-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Notice extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 公告标题
     */
    private String title;

    /**
     * 公告内容
     */
    private String content;

    /**
     * 发布时间
     */
    private LocalDateTime createTime;

    /**
     * 状态（0=未发布，1=已发布）
     */
    private Integer status;

    /**
     * 浏览量
     */
    private Long view;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    public Notice(Long id, Integer statue,Integer statu) {
        super(id);
        this.status = statu;
    }

    public Notice(Long id, String title, String content){
        super(id);
        this.title=title;
        this.content=content;
    }
    public Notice(String title,String content){
        this.title=title;
        this.content=content;
    }
    public Notice(Long id,Long view){
        super(id);
        this.view=view;
    }


    public Notice(String title, String content, LocalDateTime time) {
        this.title=title;
        this.content=content;
        this.createTime=time;
    }
}
